﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MyAdmin/QuanLy.master" AutoEventWireup="true" CodeFile="TacGia_AM.aspx.cs" Inherits="MyAdmin_TacGia_AM" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <fieldset>
        <legend align="center"><b>Tác Giả</b></legend>  
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
        	<tr>
        		<td align="center">
                 <asp:DetailsView ID="dtvTacGia_AM" runat="server" 
        AutoGenerateRows="False" DataKeyNames="ID" DataSourceID="LQDSTacGia_AM" 
        Height="50px" Width="50%" HeaderText="Tác Giả" 
            BorderStyle="Ridge" BackColor="White" BorderColor="White" 
            BorderWidth="2px" CellSpacing="1" CellPadding="3" GridLines="None" 
            oniteminserted="dtvTacGia_AM_ItemInserted" onitemupdated="dtvTacGia_AM_ItemUpdated" 
           >
        <EditRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
         <Fields>
             <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" 
                 SortExpression="ID" InsertVisible="False" />
             <asp:BoundField DataField="Ten" HeaderText="Tên Tác Giả" SortExpression="Ten" />
             <asp:CheckBoxField DataField="DaXoa" HeaderText="Đã Xóa" 
                 SortExpression="DaXoa" />
             <asp:CommandField ShowEditButton="True" ShowInsertButton="True" 
                 CancelText="Hủy" EditText="Cập Nhật" InsertText="Thêm" NewText="Thêm" 
                 UpdateText="Cập Nhật" />
         </Fields>
        <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="#E7E7FF"  />
        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
        <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
    </asp:DetailsView>
     <asp:Label runat="server" Text="Label" ID="lblThongBaoDTView" ForeColor="White" Visible="false"/>
                </td>
        	</tr>
        </table><br />
    <asp:GridView ID="gvDSTacGia_AM" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" BackColor="White" 
        BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
        DataKeyNames="ID" DataSourceID="LQDSTacGia_AM" GridLines="Vertical" 
        Width="100%" onrowdeleted="gvDSTacGia_AM_RowDeleted" 
            onselectedindexchanged="gvDSTacGia_AM_SelectedIndexChanged" 
            onpageindexchanging="gvDSTacGia_AM_PageIndexChanging" 
            onrowdeleting="gvDSTacGia_AM_RowDeleting" Height="168px" 
            onpageindexchanged="gvDSTacGia_AM_PageIndexChanged">
        <AlternatingRowStyle BackColor="#DCDCDC" />
        <Columns>
            <asp:CommandField ShowSelectButton="True" 
                DeleteText="Xóa" SelectText="Chọn" />
            <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" 
                SortExpression="ID" />
            <asp:BoundField DataField="Ten" HeaderText="Tên Tác Giả" SortExpression="Ten" />
            <asp:CheckBoxField DataField="DaXoa" HeaderText="Đã Xóa" 
                SortExpression="DaXoa" />
           <asp:TemplateField>
                <ItemTemplate>
                    <asp:CheckBox ID="checkXoa" runat="server" AutoPostBack="True" />
                </ItemTemplate>
                </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <HeaderStyle BackColor="#000084" BorderStyle="None" Font-Bold="True" 
            ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#0000A9" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#000065" />
    </asp:GridView> 
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
    	<tr>
    		<td align="right">
                <asp:Label ID="lblThongBaoGridView" runat="server" ForeColor="White" Text="Label"></asp:Label>
                  <asp:Button ID="XoaNhieuBUTTON" runat="server" Text="Xóa Đã Chọn" onclick="XoaNhieuBUTTON_Click" />
            </td>
    	</tr>
    </table> 

    <asp:LinqDataSource ID="LQDSTacGia_AM" runat="server" 
        ContextTypeName="DataAccess_Layer.DataClasses_RetailerDataContext" 
        EnableDelete="True" EnableInsert="True" EnableUpdate="True" EntityTypeName="" 
        TableName="TacGias" oninserted="LQDSHoaDon_AM_Inserted" >
    </asp:LinqDataSource>
   
    </fieldset>
</asp:Content>

